/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "system";
    object      functions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#includeFunc wallHeatFlux
(
    name=liquidWallHeatFlux,
    writeFields=false,
    phase=liquid,
    region=fluid
)

#includeFunc wallHeatFlux
(
    name=gasWallHeatFlux,
    writeFields=false,
    phase=gas,
    region=fluid
)

#includeFunc wallHeatFlux
(
    name=solidWallHeatFlux,
    writeFields=false,
    region=solid,
    log=yes
)

#includeFunc wallBoilingProperty(wetFraction, region=fluid)
#includeFunc wallBoilingProperty(dDeparture, region=fluid)
#includeFunc wallBoilingProperty(fDeparture, region=fluid)
#includeFunc wallBoilingProperty(nucleationSiteDensity, region=fluid)

#includeFunc removeObjects
(
    wallBoiling:wetFraction,
    wallBoiling:dDeparture,
    wallBoiling:fDeparture,
    wallBoiling:nucleationSiteDensity,
    region=fluid
)

outflow
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    region          fluid;
    patch           outlet;
    operation       sum;
    fields          (alphaRhoPhi.gas alphaRhoPhi.liquid);
}

inflow
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    region          fluid;
    patch           inlet;
    operation       sum;
    fields          (alphaRhoPhi.gas alphaRhoPhi.liquid);
}

outletGas
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    region          fluid;
    patch           outlet;
    operation       sum;
    weightField     alphaRhoPhi.gas;
    fields          (h.gas);
}

outletLiquid
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    region          fluid;
    patch           outlet;
    operation       sum;
    weightField     alphaRhoPhi.liquid;
    fields          (h.liquid);
}

inletGas
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    region          fluid;
    patch           inlet;
    operation       sum;
    weightField     alphaRhoPhi.gas;
    fields          (h.gas);
}

inletLiquid
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");
    log             yes;
    writeFields     false;
    region          fluid;
    patch           inlet;
    operation       sum;
    weightField     alphaRhoPhi.liquid;
    fields          (h.liquid);
}

writeObjects1
{
    type            writeObjects;
    libs            ("libutilityFunctionObjects.so");
    region          fluid;

    objects
    (
        rho.gas
        mu.gas
        psi.gas
        kappa.gas
        rho.liquid
        mu.liquid
        psi.liquid
        kappa.liquid
        h.liquid
        h.gas
    );

    writeControl    writeTime;
    writeInterval   1;
}

// ************************************************************************* //
